package com.androidx.p013lv.mine.model;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.androidx.p013lv.base.http.BaseRes;
import com.androidx.p013lv.base.http.HttpUtils;
import com.androidx.p013lv.base.http.UrlManager;
import com.androidx.p013lv.base.http.callback.HttpCallback;
import com.androidx.p013lv.mine.bean.CollectVideoBean;

/* renamed from: com.androidx.lv.mine.model.MineCollectModel */
public class MineCollectModel extends ViewModel {
    private MutableLiveData<Boolean> actionLive;
    private MutableLiveData<BaseRes<CollectVideoBean>> collectData;

    public MutableLiveData<Boolean> getActionLive() {
        if (this.actionLive == null) {
            this.actionLive = new MutableLiveData<>();
        }
        return this.actionLive;
    }

    public MutableLiveData<BaseRes<CollectVideoBean>> dataCollect() {
        if (this.collectData == null) {
            this.collectData = new MutableLiveData<>();
        }
        return this.collectData;
    }

    public void userCollections(int i) {
        HttpUtils.getInsatance().get(UrlManager.getInsatance().userCollections(i, false), new HttpCallback<BaseRes<CollectVideoBean>>("userCollections") {
            /* class com.androidx.p013lv.mine.model.MineCollectModel.C13551 */

            public void onLvSuccess(BaseRes<CollectVideoBean> baseRes) {
                MineCollectModel.this.collectData.setValue(baseRes);
            }
        });
    }

    public void deleteCollect(String str) {
        HttpUtils.getInsatance().post(UrlManager.getInsatance().cancelVideoLike(), str, new HttpCallback<BaseRes>("cancelVideoLike") {
            /* class com.androidx.p013lv.mine.model.MineCollectModel.C13562 */

            public void onLvSuccess(BaseRes baseRes) {
            }
        });
    }

    public void setActionLive(boolean z) {
        this.actionLive.setValue(Boolean.valueOf(z));
    }

    public void cancelHttp() {
        HttpUtils.getInsatance().cancelTag("userCollections");
        HttpUtils.getInsatance().cancelTag("cancelVideoLike");
    }
}
